"""
此题目比较简单，注意global要在main中
关于此外的题目涉及python的declare，建议声明相对应类型的匹配长度的数组，不要后期使用append
biii题细致一点，测试要有两个数据
"""

def linearSearch(searchValue):
    for x in range(0, 10):
        if arrayData[x] == searchValue:
            return True
    return False


def bubbleSort():
    for x in range(0, 10):
        for y in range(0, 9-x):
            if arrayData[y] < arrayData[y + 1]:
                temp = arrayData[y]
                arrayData[y] = arrayData[y + 1]
                arrayData[y + 1] = temp
global arrayData
arrayData = [10, 5, 6, 7, 1, 12, 13, 15, 21, 8]
searchValue = int(input("Enter the number to search for"))
returnValue = linearSearch(searchValue)
if returnValue == True:
    print("It was found")
else:
    print("It was not found")

bubbleSort()
print(arrayData)